﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace pufflesweb.admin
{
    public partial class Aapplycheck : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string HAID = Request.QueryString["HAID"];

                PModel.HApply happly = PBLL.HApply.Getuser(int.Parse(HAID));

                this.hachecktext.Text = happly.HAchecktext;
                this.hacheck.Text = happly.HAcheck.ToString();
                this.HiddenField1.Value = happly.HAID.ToString();
            }
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            PModel.HApply happly = new PModel.HApply();
            happly.HAID = int.Parse(this.HiddenField1.Value);
            happly.HAcheck = int.Parse(this.hacheck.Text);
            happly.HAchecktext = this.hachecktext.Text;

            if (PBLL.HApply.Check(happly))
            {
                PF.JsHelper.AlertAndParentUrl("修改保存成功", "main.aspx");
            }
            else
            {
                PF.JsHelper.AlertAndParentUrl("修改失败,请重新输入", "Aapplycheck.aspx");
            }
        }
    }
}